
import cx_Oracle,base64

dbname="orabiz"
username="cffex"
passwd="Yml6X3Bhc3NfMDkwOA=="

con=cx_Oracle.connect("%s/%s@%s" % (username,base64.decodestring(passwd),dbname))
cur=con.cursor()
res=cur.execute("select YEAR,MONTH,DAY,TRA from exchangeadmin.t_calendar order by 1,2,3")

for YEAR,MONTH,DAY,TRA in res.fetchall():
	if int(MONTH)<10:
		MONTH="0"+str(MONTH)
	if int(DAY)<10:
		DAY="0"+str(DAY)
	print "%4s%2s%2s\t%s" % (YEAR,MONTH,DAY,TRA)
	
